package com.dstz.bpm.core.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.dstz.base.api.model.IBaseModel;
import com.dstz.bpm.api.model.def.IBpmDefinition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang3.builder.ToStringBuilder;

@XmlRootElement(
   name = "BpmDefinition"
)
@XmlAccessorType(XmlAccessType.NONE)
@ApiModel(
   description = "流程定义"
)
public class BpmDefinition implements IBaseModel, IBpmDefinition {
   @ApiModelProperty("流程定义ID")
   protected String id;
   @XmlAttribute(
      name = "name"
   )
   @ApiModelProperty("流程定义名字")
   protected String name;
   @XmlAttribute(
      name = "key"
   )
   @ApiModelProperty("流程定义KEY")
   protected String key;
   @XmlAttribute(
      name = "desc"
   )
   @ApiModelProperty("描述信息")
   protected String desc;
   @XmlAttribute(
      name = "typeId"
   )
   @ApiModelProperty("流程分类")
   protected String x;
   @XmlAttribute(
      name = "status"
   )
   @ApiModelProperty("流程状态")
   protected String status = "draft";
   @ApiModelProperty("原生流程定义ID")
   protected String y;
   @ApiModelProperty("原生流程设计MOdelID")
   protected String z;
   @ApiModelProperty("原生DeployId")
   protected String A;
   @ApiModelProperty("版本号")
   protected Integer version;
   @ApiModelProperty(
      hidden = true
   )
   protected String B;
   @ApiModelProperty("是否主版本，Y/N")
   protected String C;
   protected String createBy;
   protected Date createTime;
   protected String D;
   protected String updateBy;
   protected Date updateTime;
   @XmlAttribute(
      name = "supportMobile"
   )
   @ApiModelProperty("是否支持移动端")
   protected Integer supportMobile = 0;
   @XmlElement(
      name = "defSetting"
   )
   @JSONField(
      serialize = false
   )
   @ApiModelProperty(
      hidden = true
   )
   protected String E;
   @ApiModelProperty("乐观锁版本判断")
   protected Integer rev;

   public void setId(String id) {
      this.id = id;
   }

   public String getId() {
      return this.id;
   }

   public void setName(String name) {
      this.name = name;
   }

   public String getName() {
      return this.name;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getKey() {
      return this.key;
   }

   public void setDesc(String desc) {
      this.desc = desc;
   }

   public String getDesc() {
      return this.desc;
   }

   public void setTypeId(String typeId) {
      this.x = typeId;
   }

   public String getTypeId() {
      return this.x;
   }

   public void setStatus(String status) {
      this.status = status;
   }

   public String getStatus() {
      return this.status;
   }

   public void setActDefId(String actDefId) {
      this.y = actDefId;
   }

   public String getActDefId() {
      return this.y;
   }

   public void setActModelId(String actModelId) {
      this.z = actModelId;
   }

   public String getActModelId() {
      return this.z;
   }

   public void setActDeployId(String actDeployId) {
      this.A = actDeployId;
   }

   public String getActDeployId() {
      return this.A;
   }

   public void setVersion(Integer version) {
      this.version = version;
   }

   public Integer getVersion() {
      return this.version;
   }

   public void setMainDefId(String mainDefId) {
      this.B = mainDefId;
   }

   public String getMainDefId() {
      return this.B;
   }

   public void setIsMain(String isMain) {
      this.C = isMain;
   }

   public String getIsMain() {
      return this.C;
   }

   public void setCreateBy(String createBy) {
      this.createBy = createBy;
   }

   public String getCreateBy() {
      return this.createBy;
   }

   public void setCreateTime(Date createTime) {
      this.createTime = createTime;
   }

   public Date getCreateTime() {
      return this.createTime;
   }

   public void setCreateOrgId(String createOrgId) {
      this.D = createOrgId;
   }

   public String getCreateOrgId() {
      return this.D;
   }

   public void setUpdateBy(String updateBy) {
      this.updateBy = updateBy;
   }

   public String getUpdateBy() {
      return this.updateBy;
   }

   public void setUpdateTime(Date updateTime) {
      this.updateTime = updateTime;
   }

   public Date getUpdateTime() {
      return this.updateTime;
   }

   public void setSupportMobile(Integer supportMobile) {
      this.supportMobile = supportMobile;
   }

   public Integer getSupportMobile() {
      return this.supportMobile;
   }

   public void setDefSetting(String defSetting) {
      this.E = defSetting;
   }

   public String getDefSetting() {
      return this.E;
   }

   public void setRev(Integer rev) {
      this.rev = rev;
   }

   public Integer getRev() {
      return this.rev;
   }

   public String toString() {
      return (new ToStringBuilder(this)).append("id", this.id).append("name", this.name).append("key", this.key).append("desc", this.desc).append("typeId", this.x).append("status", this.status).append("actDefId", this.y).append("actModelId", this.z).append("actDeployId", this.A).append("version", this.version).append("mainDefId", this.B).append("isMain", this.C).append("createBy", this.createBy).append("createTime", this.createTime).append("createOrgId", this.D).append("updateBy", this.updateBy).append("updateTime", this.updateTime).append("supportMobile", this.supportMobile).append("defSetting", this.E).append("rev", this.rev).toString();
   }
}
